package com.dongdongshop.api;

import com.dongdongshop.data.Result;
import com.dongdongshop.dto.AddressDTO;
import com.dongdongshop.dto.UserDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient("dongdongshop-user-service")
public interface UserServiceApi {

    @PostMapping("/user/register")
    Result<UserDTO> register(@RequestBody UserDTO userDTO);

    @PostMapping("/user/registerWeibo")
    Result<UserDTO> registerWeibo(@RequestBody UserDTO userDTO);

    @PostMapping("/user/getUserByName")
    Result<UserDTO> getUserByName(@RequestParam String userName);

    @PostMapping("/address/getAddressById")
     Result<AddressDTO> getAddressById(@RequestParam Long addressId);

}


